import { defineStore } from 'pinia';

export const useUserStore = defineStore('user', {
  state: () => ({
    userInfo: null,  // 用户信息
  }),
  // 你可以添加 actions, getters 等
  actions: {
    setUserInfo(userInfo) {
      this.userInfo = userInfo;
    },
    logout() {
      this.userInfo = null;
    },
  },
});